import type { LoginResult } from "@/types/member"
import { http } from "@/utils/http"
type LoginParamas = {
  code: string
  encryptedData: string
  iv: string
}
export const postLoginWxMinAPI = (data: LoginParamas) => {
  return http<LoginResult>({
    method: 'POST',
    url: '/login/wxMin',
    data,
  })
}
//用于测试登录的接口

/**
 * @param phoneNumber 模拟手机号码
 */
export const postLoginWxMinSimpleAPI = (token: string) => {
  return http<LoginResult>({
    method: 'GET',
    url: '/user/profile',
    data: {
      token,
    },
  })
}
//用于更新用户信息的接口

/**
 * @param phoneNumber 模拟手机号码
 */
export const putupdteUserSimpleAPI = (token: string, User: LoginResult) => {
  return http<LoginResult>({
    method: 'POST',
    url: `/user/${token}`,
    data: {
      User,
    },
  })
}
